package com.course.domain.vo;

import com.course.domain.dto.CourseCommentDto;
import com.course.domain.pojo.CourseDetail;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Data
public class CourseCommentVo {
    private Integer total;
    private List<CourseCommentDto> data;

    public static CourseCommentVo createCourseCommentVo() {
        CourseCommentVo courseCommentVo = new CourseCommentVo();
        courseCommentVo.setTotal(0);
        courseCommentVo.setData(Collections.emptyList());
        return courseCommentVo;
    }

    public static CourseCommentVo createCourseCommentVo(List<CourseCommentDto> courseCommentDtoList, Integer total) {
        CourseCommentVo courseCommentVo = new CourseCommentVo();
        courseCommentVo.setTotal(total);
        courseCommentVo.setData(courseCommentDtoList);
        return courseCommentVo;
    }
}
